﻿namespace YunQue.DataBase.Configuration.System
{
    /// <summary>
    /// 用户实体配置
    /// </summary>
    public class UserEnityConfiguration :BaseEntityConfiguration<UserEntity>
    {
        /// <summary>
        /// 配置
        /// </summary>
        /// <param name="builder"></param>
        public override void Configure(EntityTypeBuilder<UserEntity> builder)
        {
            base.Configure(builder);
            builder.ToTable("user");
            builder.Property(u => u.Name).HasColumnName("name").HasMaxLength(100).HasColumnType("varchar").HasComment("名字").IsRequired();
            builder.Property(u => u.Password).HasColumnName("password").HasColumnType("text").HasComment("密码").IsRequired();
            builder.Property(u => u.Avatar).HasColumnName("avatar").HasColumnType("text").HasComment("头像");
        }
    }
}
